package gson.emlog.activity;

import gson.emlog.R;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;

/**
 * 
 * @author GodSon
 *
 */
public class Cloud extends TabActivity {
	private TabHost tabHost;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.cloud);
		tabHost = getTabHost();
		
		tabHost.addTab(tabHost.newTabSpec("cloud_tab_space_blog")
				.setIndicator(getResources().getString(R.string.logs),getResources().getDrawable(R.drawable.logs))
				.setContent(new Intent(this, CloudBlogs.class)));
		tabHost.addTab(tabHost.newTabSpec("cloud_tab_space_tw")
				.setIndicator(getResources().getString(R.string.twitter),getResources().getDrawable(R.drawable.twitter))
				.setContent(new Intent(this, CloudTwitters.class)));
		tabHost.setCurrentTab(0);
		
		tabHost.setOnTabChangedListener(new OnTabChangeListener()
        {
            public void onTabChanged(String tabId)
            {
            	tabHost.setCurrentTabByTag(tabId);
            }           
        });
	}
}
